package com.google.code.geocoder.model;

import java.io.Serializable;

public class DirectionsDistance implements Serializable {
    private static final long serialVersionUID = 1L;

    private int value;
    private String text;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DirectionsDistance that = (DirectionsDistance) o;

        if (value != that.value) return false;
        if (text != null ? !text.equals(that.text) : that.text != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = value;
        result = 31 * result + (text != null ? text.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "DirectionsDistance{" +
                "value=" + value +
                ", text='" + text + '\'' +
                '}';
    }
}
